package com.qdsg.modulesihealsdk.ecgSingle.callback;

/**
 * @Description
 * @Author WuJianFeng
 * @Date 2023/2/6 18:49
 */
public class ECGSingleCallback {
    public IECGSingle iecgSingle;
    private static ECGSingleCallback mECGSingleCallback;
    public static ECGSingleCallback getInstance(IECGSingle iecgSingle){
        if (iecgSingle != null){
            return mECGSingleCallback = new ECGSingleCallback(iecgSingle);
        }else {
            return  mECGSingleCallback;
        }
    }
    public static ECGSingleCallback getInstance(){
        if (mECGSingleCallback != null){
            return mECGSingleCallback;
        }else {
            return null;
        }
    }
    private ECGSingleCallback(IECGSingle iecgSingle){
        this.iecgSingle = iecgSingle;
    }

    public void destroy(){
        if (iecgSingle != null){
            iecgSingle = null;
        }
        if (mECGSingleCallback != null){
            mECGSingleCallback = null;
        }
    }
}
